import i18n from '../../lang';
/*
/ 全局静态变量定义
切勿随意修改数组次序，很多地方已下标方式使用
 */

export const page = {
  limit: [20, 40, 60, 80, 100],
  page: 1,
  layout: 'total, sizes, prev, pager, next, jumper',
};

/**
 * 无限极分类type
 * @type {{product: number, attachment: number, menu: number, article: number, operator: number}}
 */
export const categoryType = [
  // 1 产品分类，2 附件分类，3 文章分类， 4 设置分类， 5 菜单分类， 6 配置分类， 7 秒杀配置
  { name: i18n.t('chanPinFenLei'), value: 1, shortName: i18n.t('chanPin') },
  { name: i18n.t('fuJianFenLei'), value: 2, shortName: i18n.t('fuJian') },
  { name: i18n.t('wenZhangFenLei'), value: 3, shortName: i18n.t('wenZhang') },
  { name: i18n.t('sheZhiFenLei'), value: 4, shortName: i18n.t('sheZhi') },
  { name: i18n.t('caiDanFenLei'), value: 5, shortName: i18n.t('caiDan') },
  { name: i18n.t('peiZhiFenLei'), value: 6, shortName: i18n.t('peiZhi') },
  { name: i18n.t('miaoShaPeiZhi'), value: 7, shortName: i18n.t('miaoSha') },
];

export const roleListStatus = [
  { label: i18n.t('quanBu'), value: '' },
  { label: i18n.t('xianShi'), value: 1 },
  { label: i18n.t('buXianShi'), value: 0 },
];

export const showHiddenStatus = [
  { label: i18n.t('xianShi'), value: '‘1’' },
  { label: i18n.t('buXianShi'), value: '‘0’' },
];

export const switchStatus = [
  { label: i18n.t('kaiQi'), value: 1 },
  { label: i18n.t('guanBi'), value: 0 },
];

export const deletedOrNormal = [
  { label: i18n.t('zhengChang'), value: 0 },
  { label: i18n.t('yiShanChu'), value: 1 },
];

/**
 * 暂时弃用
 * @type {*[]}
 */
export const configCategory = [
  { label: i18n.t('xiTong'), value: '0' },
  { label: i18n.t('yingYong'), value: '1' },
  { label: i18n.t('zhiFu'), value: '2' },
  { label: i18n.t('qiTa'), value: '3' },
];

/**
 * 表单配置集合集中配置
 * @type {{id: number, dis: string}[]}
 */
export const formConfigIds = [
  { id: 84, dis: i18n.t('weiXinGongZhongHaoBiaoDanPeiZhi') },
  { id: 86, dis: i18n.t('miaoShaPeiZhi') },
];

/**
 * 时间选择器
 */
export const fromList = {
  title: i18n.t('xuanZeShiJian'),
  custom: true,
  fromTxt: [
    { text: i18n.t('quanBu'), val: '' },
    { text: i18n.t('jinTian'), val: 'today' },
    { text: i18n.t('zuoTian'), val: 'yesterday' },
    { text: i18n.t('zuiJinNTian', [7]), val: 'lately7' },
    { text: i18n.t('zuiJinNTian', [30]), val: 'lately30' },
    { text: i18n.t('benYue'), val: 'month' },
    { text: i18n.t('benNian'), val: 'year' },
  ],
};

// 统计管理时间选择器
export const timeList = {
  title: i18n.t('xuanZeShiJian'),
  custom: true,
  fromTxt: [
    { text: i18n.t('zuoTian'), val: `` },
    { text: i18n.t('zuiJinNTian', [7]), val: 'lately7' },
    { text: i18n.t('zuiJinNTian', [30]), val: 'lately30' },
  ],
};

// 商户审核状态
export const statusList = {
  title: i18n.t('zhuangTai'),
  custom: true,
  fromTxt: [
    { text: i18n.t('quanBu'), val: '' },
    { text: i18n.t('daiShenHe'), val: '1' },
    { text: i18n.t('shenHeTongGuo'), val: '2' },
    { text: i18n.t('shenHeJuJue'), val: '3' },
  ],
};

// 数值范围
export const NUM_Range = {
  min: 1,
  max: 9999,
};
